import request from '@/utils/request'

// 查询角色信息列表
export function listRoles(query) {
  return request({
    url: '/system/roles/list',
    method: 'get',
    params: query
  })
}

// 查询角色信息详细
export function getRoles(rolesId) {
  return request({
    url: '/system/roles/' + rolesId,
    method: 'get'
  })
}

// 新增角色信息
export function addRoles(data) {
  return request({
    url: '/system/roles',
    method: 'post',
    data: data
  })
}

// 修改角色信息
export function updateRoles(data) {
  return request({
    url: '/system/roles',
    method: 'put',
    data: data
  })
}

// 删除角色信息
export function delRoles(rolesId) {
  return request({
    url: '/system/roles/' + rolesId,
    method: 'delete'
  })
}

// 导出角色信息
export function exportRoles(query) {
  return request({
    url: '/system/roles/export',
    method: 'get',
    params: query
  })
}